package com.vincent.template.commons.base;

import java.io.Serializable;

/**
 * @author Vincent Wang
 * @date 2021/1/16 01:44
 */
public class VctTriple<L, M, R> implements Serializable {

    private static final long serialVersionUID = 320879918772669288L;

    private L left;

    private M middle;

    private R right;

    public VctTriple() {
    }

    public VctTriple(L left, M middle, R right) {
        this.left = left;
        this.middle = middle;
        this.right = right;
    }

    public L getLeft() {
        return left;
    }

    public void setLeft(L left) {
        this.left = left;
    }

    public M getMiddle() {
        return middle;
    }

    public void setMiddle(M middle) {
        this.middle = middle;
    }

    public R getRight() {
        return right;
    }

    public void setRight(R right) {
        this.right = right;
    }

    public static <L, M, R> VctTriple<L, M, R> of(L left, M middle, R right) {
        return new VctTriple<>(left, middle, right);
    }

    @Override
    public String toString() {
        return "VctTriple{" +
                "left=" + left +
                ", middle=" + middle +
                ", right=" + right +
                '}';
    }
}
